// 图标组件 None

import React from 'react';
import { createFromIconfontCN } from '@ant-design/icons';
import { IconFontProps as _IconFontProps } from '@ant-design/icons/es/components/IconFont';

declare type IconFontProps = _IconFontProps

/**
 * 需要在global.tsx中引入 require('../assets/iconfont/iconfont');
 */
const Icon = createFromIconfontCN(
  // 在 global.ts 全局引入后，此处不生效；需要在global.tsx中加入：import './assets/iconfont/iconfont.js';
  {
    scriptUrl: '../assets/iconfont/iconfont.js',
  },
);

const IconFont: React.FC<IconFontProps> = (props) => <Icon { ... props } />;

export {
  IconFontProps,
  IconFont,
};
